Exercise 1

Install and attach the Rvest package. You can find more information about the package here
# installing package
install.packages("rvest", quiet = TRUE)

# attaching package
library(rvest, warn.conflicts = FALSE, quietly = TRUE)

Exercise 2

Go to the Wikipedia Entry of YouTube in your https://en.wikipedia.org/wiki/YouTube Browser and find the Xpath that corresponds to the whole table on the right side of the screen.
You can do this in Google Chrome by going to the website, right clicking on the page and clicking on inspect. Alternatively, you can just press Ctrl + Alt + I. By expanding the containers and hovering your mouse over them, you can see which elements on the website they correpsond to. To copy the Xpath of an element, right-click on the container and select copy -> Copy full Xpath. Be carefull to select the HTML that encompasses the entire table and not only parts of it
TablePath <- "/html/body/div[3]/div[3]/div[4]/div/table[1]"

Exercise 3

Using the Xpath extract the information from the table
Use the read_html(), html_nodes() and html_table() functions. You can read more about them in the Help panel in R studio or by calling them preceded by two question marks, e.g. ??read_html().
# Setting URL
url <- "https://en.wikipedia.org/wiki/YouTube"

# Reading HTML from URL
html <- read_html(url)

# Navigating to the HTML node with the table object
Node <- html_nodes(html, xpath = TablePath)

# Extracting the table to R-object
Table <- html_table(Node)

# unlisting dataframe
YouTubeData <- Table[[1]]

Exercise 4

Go to the YouTube API console and check the amount of requests you already made for the app you are using
You can do this by going to the Developer Console and logging in with the Google account youmade for the workshop. On the top right, next to the “GoogleAPIs” logo, you can make sure that you have selected the right project. If you click on the “Dashboard” panel, you can see the traffic your app has generated.

Exercise 5

Go to the YouTube quota calulator and calculate the resources needed for the following scenarios:

[Insert Scenarios here]

You can find the qota calculator here and select the right resource, method and parts using the radio button menu. The quota cost of one such call is displayed on the right side.
Add Solution here